<?php

/**
 * admin的service
 * @author 陈德本
 */
class adminService extends commonService {

    /**
     *
     * @var adminDao
     */
    protected $pao;

    public function __construct() {
        parent::__construct();
        $this->pao = InitPHP::getDao("admin");
    }

    /**
     * 根据用户名获取用户信息
     *
     * @param unknown $data            
     */
    public function getOneByName($name) {
        return $this->pao->getOneByField(array(
            'admin_name' => $name
        ));
    }
    /**
     * 根据邮箱获取用户信息
     *
     * @param unknown $data            
     */
    public function getOneByEmail($email) {
        return $this->pao->getOneByField(array(
            'email' => $email
        ));
    }
}